package com.my.study.design.decorator;

/**
 * @author Carlos
 * @version 1.0
 * @Description drink
 * @date 2021/7/18 18:24
 **/
public abstract class Drink {

    /** 描述 */
    public String des;
    /** 价格 */
    private float price = 0.0f;

    public String getDes() {
        return des;
    }

    public void setDes(String des) {
        this.des = des;
    }

    public float getPrice() {
        return price;
    }

    public void setPrice(float price) {
        this.price = price;
    }

    /**
     * 计算费用的方法
     *
     * 子类具体实现
     *
     * @return 费用
     */
    protected abstract float cost();
}
